df = df.apply(lambda x: np.square(x) if x.name in [ a, e, g] else x, axis=1)

30

import numpy as np  # optional
import pandas as pd
print(pd.__version__)
print(pd.show_versions(as_json=True))

Comments

Submit
0 Comments